<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<table id="dataGrid" class="easyui-datagrid"
	data-options="
	    url:'role/list', 
	    fit:true,
	    fitColumns:true,
	    singleSelect:true,
	    rownumbers:true,
	    remoteSort:false, //本地排序
	    //sortName:'name', //默认排序的字段
	    //sortOrder:'asc', //默认的排序规则 ‘asc’、‘desc’
	    //onLoadSuccess:function(){refreshPowerDialog()}
	    //onBeforeRender:function(){refreshPowerDialog()}
	    toolbar:[{
		    	text:'添加',
		    	iconCls:'icon-add',
		    	handler:function(){openAddDialog()}
		    },'-',{
		    	text:'修改',
		    	iconCls:'icon-edit',
		    	handler:function(){openEditDialog()}
		    },'-',{
		    	text:'删除',
		    	iconCls:'icon-remove',
		    	handler:function(){openDeleteDialog()}
		    },'-',{
		    	text:'为角色分配菜单',
		    	iconCls:'icon-advancedsettings',
		    	handler:function(){openMenuChooseDialog()}
		    },'-',{
		    	text:'为角色分配用户',
		    	iconCls:'icon-advancedsettings',
		    	handler:function(){openUserChooseDialog()}
		    },'-',{
		    	text:'为角色分配权限',
		    	iconCls:'icon-advancedsettings',
		    	handler:function(){openPowerChooseDialog()}
		    }]
	">
	
	<thead>
		<tr>
			<th
				data-options="field:'id',title:'编号',width:40,align:'right',sortable:true"></th>
			<th data-options="field:'name',title:'角色名称',width:80,sortable:true"></th>
			<th
				data-options="field:'description',title:'描述',width:80,sortable:true"></th>
			<th data-options="field:'order_id',title:'排序',width:80,sortable:true"></th>
		</tr>
	</thead>
</table>
